<?php
/**
 * PHP Framework Seo Price List Uri class
 *
 * @author Andrew <andrew@vitche.com>
 * @author Frozen Rain <frozenrain@mail.ru>
 **/
class PriceListUri extends FriendlyUri {

    /**
     * TODO: Whether this can be improved in terms of SEO?
     *
     * @param object $ProductCategory A product category to build price Uri from
     * @return string The resulting Uri
     */
    public static function buildWithProductCategory($ProductCategory) {

        $result = '';
        if (isset($ProductCategory)) {
            $result .= FriendlyUri::buildFriendlyString($ProductCategory->name);
            $result .= '-pr' . $ProductCategory->id . '.html';
        } else {
            $result .= 'pr0.html';
        }

        return $result;
    }
}
?>